fix: fonts flash - #348
Conversation
There was a problem hiding this comment.
marketing-site AI Review: 🟢 Completed
Note
Low Risk
The changes involve swapping static font assets, cleaning up redundant CSS definitions, and tweaking font rendering strategies. They strictly affect UI styling and have no impact on the system's business logic, functionality, or operational infrastructure.
Overview
Replaces unoptimized .ttf fonts (Gemunu Libre, Inter, Red Hat Display) with highly compressed .woff2 equivalents, significantly reducing asset payloads. In @theme/styles.css, it cleans up duplicate @font-face rules, appends format('woff2') to the src declarations, and broadly removes font-display: swap; to prevent the flash of unstyled text (FOUT) that occurs during a hard reload. Finally, it updates types/custom.d.ts with a module declaration to support *.woff2 imports in TypeScript.
What/Why/How?
Fix a bug with fonts after hard reload.
Reference
Testing
Screenshots (optional)
Before:
Screen.Recording.2026-07-23.at.17.08.42.mov
After:
Screen.Recording.2026-07-23.at.17.11.47.mov
Check yourself
Security